using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using WCSFContrib.Extensions.CompositeWeb.Interfaces;
using WCSFContrib.Extensions.CompositeWeb.Services;

namespace WCSFContrib.Extensions.CompositeWeb.Tests
{
    [TestClass]
    public class ServiceInfoFixture
    {
        [TestMethod]
        public void InitializesCorrectly()
        {
            ServiceInfo sInfo = new ServiceInfo(typeof(IServiceLoader), typeof(ServiceLoader), "Global");

            Assert.AreEqual(typeof(IServiceLoader), sInfo.RegisterAs);
            Assert.AreEqual(typeof(ServiceLoader), sInfo.Type);
            Assert.AreEqual(ServiceScope.Global, sInfo.Scope);
        }

        [TestMethod]
        [ExpectedException(typeof(ArgumentException))]
        public void ShouldFailIfScopeNotExists()
        {
            ServiceInfo sInfo = new ServiceInfo(typeof(IServiceLoader), typeof(ServiceLoader), "Any");
        }
    }
}
